package com.neusoft.nep.SystemAdminstrator.Controller;

import com.neusoft.nep.SystemAdminstrator.Common.AlertUtills;
import com.neusoft.nep.SystemAdminstrator.Common.FileUtills;
import com.neusoft.nep.common.FileUtils;
import com.neusoft.nep.entity.Feedback;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.MenuItem;
import javafx.stage.Stage;

import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;

public class indexController {
    @FXML
    private Button btn_out;
    @FXML
    private Label labID;
    public void initialize(){
        labID.setText("系统管理员：" + loginController.currentLoginID);
    }
    public void OUT(ActionEvent actionEvent){
        System.exit(0);
    }
    @FXML
    private MenuItem mi_PSL;
    @FXML
    private Label levelOneCount;
    @FXML
    private Label levelTwoCount, levelThreeCount, levelFourCount, levelFiveCount, levelSixCount;

    public void  PSLClick(ActionEvent event) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        URL url = getClass().getResource("../View/publicList.fxml");
        fxmlLoader.setLocation(url);
        Parent root = fxmlLoader.load();
        Scene scene = btn_out.getScene();
        scene.setRoot(root);
        Stage stage = (Stage) scene.getWindow();
        stage.show();
    }
    @FXML
    private MenuItem mi_AQI;
    public void AQIListClick(ActionEvent event) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        URL url = getClass().getResource("../View/AQImakesure.fxml");
        fxmlLoader.setLocation(url);
        Parent root = fxmlLoader.load();
        Scene scene = btn_out.getScene();
        scene.setRoot(root);
        Stage stage = (Stage) scene.getWindow();
        stage.show();
    }
    @FXML
    private MenuItem mi_PGC;
    public void PGCClick(ActionEvent event) throws IOException {
            FXMLLoader fxmlLoader = new FXMLLoader();
            URL url = getClass().getResource("../View/ProvincialGroupComponentItemInspectionStatistics.fxml");
            fxmlLoader.setLocation(url);
            Parent root = fxmlLoader.load();
            Scene scene = btn_out.getScene();
            scene.setRoot(root);
            Stage stage = (Stage) scene.getWindow();
            stage.show();

    }
    @FXML
    private MenuItem mi_AqiDistribute;
    public void AqiDistributeClick(ActionEvent event) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        URL url = getClass().getResource("../View/AqiDistributeTotalStatisView.fxml");
        fxmlLoader.setLocation(url);
        Parent root = fxmlLoader.load();
        Scene scene = btn_out.getScene();
        scene.setRoot(root);
        Stage stage = (Stage) scene.getWindow();
        stage.show();
    }
    @FXML
    private MenuItem mi_Other;
    public void OtherClick(ActionEvent event) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        URL url = getClass().getResource("../View/OtherTotalStatisView.fxml");
        fxmlLoader.setLocation(url);
        Parent root = fxmlLoader.load();
        Scene scene = btn_out.getScene();
        scene.setRoot(root);
        Stage stage = (Stage) scene.getWindow();
        stage.show();
    }
    @FXML
    private MenuItem mi_AqiTrendTotal;
    public void AqiTrendClick(ActionEvent event) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader();
        URL url = getClass().getResource("../View/AqiTrendTotalStatisView.fxml");
        fxmlLoader.setLocation(url);
        Parent root = fxmlLoader.load();
        Scene scene = btn_out.getScene();
        scene.setRoot(root);
        Stage stage = (Stage) scene.getWindow();
        stage.show();
    }


}
